package com.tzsafe.nfcdemo

import android.app.Application
import android.view.Gravity
import com.hjq.toast.ToastUtils
import com.tencent.mmkv.MMKV

val appContext: Application by lazy { MvvmHelper.app }

object MvvmHelper {

    lateinit var app: Application

    /**
     * 框架初始化
     * @param application Application 全局上下文
     */
    fun init(application: Application) {
        app = application
        MMKV.initialize(app)
        ToastUtils.init(app)
        ToastUtils.setGravity(Gravity.BOTTOM, 0, 100.dp)
    }
}